3.177 \(\int \cos ^6(e+f x) (a+b \sec ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=119 \[ \frac {\left (5 a^2+12 a b+8 b^2\right ) \sin (e+f x) \cos (e+f x)}{16 f}+\frac {1}{16} x \left (5 a^2+12 a b+8 b^2\right )+\frac {a (5 a+8 b) \sin (e+f x) \cos ^3(e+f x)}{24 f}+\frac {a \sin (e+f x) \cos ^5(e+f x) \left (a+b \tan ^2(e+f x)+b\right )}{6 f} \]

[Out]

1/16*(5*a^2+12*a*b+8*b^2)*x+1/16*(5*a^2+12*a*b+8*b^2)*cos(f*x+e)*sin(f*x+e)/f+1/24*a*(5*a+8*b)*cos(f*x+e)^3*si
n(f*x+e)/f+1/6*a*cos(f*x+e)^5*sin(f*x+e)*(a+b+b*tan(f*x+e)^2)/f

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4146, 413, 385, 199, 203} \[ \frac {\left (5 a^2+12 a b+8 b^2\right ) \sin (e+f x) \cos (e+f x)}{16 f}+\frac {1}{16} x \left (5 a^2+12 a b+8 b^2\right )+\frac {a (5 a+8 b) \sin (e+f x) \cos ^3(e+f x)}{24 f}+\frac {a \sin (e+f x) \cos ^5(e+f x) \left (a+b \tan ^2(e+f x)+b\right )}{6 f} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^6*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

((5*a^2 + 12*a*b + 8*b^2)*x)/16 + ((5*a^2 + 12*a*b + 8*b^2)*Cos[e + f*x]*Sin[e + f*x])/(16*f) + (a*(5*a + 8*b)
*Cos[e + f*x]^3*Sin[e + f*x])/(24*f) + (a*Cos[e + f*x]^5*Sin[e + f*x]*(a + b + b*Tan[e + f*x]^2))/(6*f)

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (In
tegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[p]
)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 413

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[((a*d - c*b)*x*(a + b*x^n)^
(p + 1)*(c + d*x^n)^(q - 1))/(a*b*n*(p + 1)), x] - Dist[1/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)
^(q - 2)*Simp[c*(a*d - c*b*(n*(p + 1) + 1)) + d*(a*d*(n*(q - 1) + 1) - b*c*(n*(p + q) + 1))*x^n, x], x], x] /;
 FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, n, p, q
, x]

Rule 4146

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rubi steps

\begin {align*} \int \cos ^6(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b+b x^2\right )^2}{\left (1+x^2\right )^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a \cos ^5(e+f x) \sin (e+f x) \left (a+b+b \tan ^2(e+f x)\right )}{6 f}+\frac {\operatorname {Subst}\left (\int \frac {(a+b) (5 a+6 b)+3 b (a+2 b) x^2}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{6 f}\\ &=\frac {a (5 a+8 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}+\frac {a \cos ^5(e+f x) \sin (e+f x) \left (a+b+b \tan ^2(e+f x)\right )}{6 f}+\frac {\left (5 a^2+12 a b+8 b^2\right ) \operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=\frac {\left (5 a^2+12 a b+8 b^2\right ) \cos (e+f x) \sin (e+f x)}{16 f}+\frac {a (5 a+8 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}+\frac {a \cos ^5(e+f x) \sin (e+f x) \left (a+b+b \tan ^2(e+f x)\right )}{6 f}+\frac {\left (5 a^2+12 a b+8 b^2\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{16 f}\\ &=\frac {1}{16} \left (5 a^2+12 a b+8 b^2\right ) x+\frac {\left (5 a^2+12 a b+8 b^2\right ) \cos (e+f x) \sin (e+f x)}{16 f}+\frac {a (5 a+8 b) \cos ^3(e+f x) \sin (e+f x)}{24 f}+\frac {a \cos ^5(e+f x) \sin (e+f x) \left (a+b+b \tan ^2(e+f x)\right )}{6 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 99, normalized size = 0.83 \[ \frac {\left (45 a^2+96 a b+48 b^2\right ) \sin (2 (e+f x))+a^2 \sin (6 (e+f x))+60 a^2 e+60 a^2 f x+3 a (3 a+4 b) \sin (4 (e+f x))+144 a b e+144 a b f x+96 b^2 e+96 b^2 f x}{192 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]^6*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

(60*a^2*e + 144*a*b*e + 96*b^2*e + 60*a^2*f*x + 144*a*b*f*x + 96*b^2*f*x + (45*a^2 + 96*a*b + 48*b^2)*Sin[2*(e
 + f*x)] + 3*a*(3*a + 4*b)*Sin[4*(e + f*x)] + a^2*Sin[6*(e + f*x)])/(192*f)

________________________________________________________________________________________

fricas [A]  time = 1.73, size = 89, normalized size = 0.75 \[ \frac {3 \, {\left (5 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} f x + {\left (8 \, a^{2} \cos \left (f x + e\right )^{5} + 2 \, {\left (5 \, a^{2} + 12 \, a b\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (5 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{48 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/48*(3*(5*a^2 + 12*a*b + 8*b^2)*f*x + (8*a^2*cos(f*x + e)^5 + 2*(5*a^2 + 12*a*b)*cos(f*x + e)^3 + 3*(5*a^2 +
12*a*b + 8*b^2)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

giac [A]  time = 0.25, size = 161, normalized size = 1.35 \[ \frac {3 \, {\left (5 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} {\left (f x + e\right )} + \frac {15 \, a^{2} \tan \left (f x + e\right )^{5} + 36 \, a b \tan \left (f x + e\right )^{5} + 24 \, b^{2} \tan \left (f x + e\right )^{5} + 40 \, a^{2} \tan \left (f x + e\right )^{3} + 96 \, a b \tan \left (f x + e\right )^{3} + 48 \, b^{2} \tan \left (f x + e\right )^{3} + 33 \, a^{2} \tan \left (f x + e\right ) + 60 \, a b \tan \left (f x + e\right ) + 24 \, b^{2} \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{3}}}{48 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/48*(3*(5*a^2 + 12*a*b + 8*b^2)*(f*x + e) + (15*a^2*tan(f*x + e)^5 + 36*a*b*tan(f*x + e)^5 + 24*b^2*tan(f*x +
 e)^5 + 40*a^2*tan(f*x + e)^3 + 96*a*b*tan(f*x + e)^3 + 48*b^2*tan(f*x + e)^3 + 33*a^2*tan(f*x + e) + 60*a*b*t
an(f*x + e) + 24*b^2*tan(f*x + e))/(tan(f*x + e)^2 + 1)^3)/f

________________________________________________________________________________________

maple [A]  time = 1.62, size = 116, normalized size = 0.97 \[ \frac {a^{2} \left (\frac {\left (\cos ^{5}\left (f x +e \right )+\frac {5 \left (\cos ^{3}\left (f x +e \right )\right )}{4}+\frac {15 \cos \left (f x +e \right )}{8}\right ) \sin \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+2 a b \left (\frac {\left (\cos ^{3}\left (f x +e \right )+\frac {3 \cos \left (f x +e \right )}{2}\right ) \sin \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+b^{2} \left (\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x)

[Out]

1/f*(a^2*(1/6*(cos(f*x+e)^5+5/4*cos(f*x+e)^3+15/8*cos(f*x+e))*sin(f*x+e)+5/16*f*x+5/16*e)+2*a*b*(1/4*(cos(f*x+
e)^3+3/2*cos(f*x+e))*sin(f*x+e)+3/8*f*x+3/8*e)+b^2*(1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e))

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 135, normalized size = 1.13 \[ \frac {3 \, {\left (5 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} {\left (f x + e\right )} + \frac {3 \, {\left (5 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} \tan \left (f x + e\right )^{5} + 8 \, {\left (5 \, a^{2} + 12 \, a b + 6 \, b^{2}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (11 \, a^{2} + 20 \, a b + 8 \, b^{2}\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{6} + 3 \, \tan \left (f x + e\right )^{4} + 3 \, \tan \left (f x + e\right )^{2} + 1}}{48 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^6*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/48*(3*(5*a^2 + 12*a*b + 8*b^2)*(f*x + e) + (3*(5*a^2 + 12*a*b + 8*b^2)*tan(f*x + e)^5 + 8*(5*a^2 + 12*a*b +
6*b^2)*tan(f*x + e)^3 + 3*(11*a^2 + 20*a*b + 8*b^2)*tan(f*x + e))/(tan(f*x + e)^6 + 3*tan(f*x + e)^4 + 3*tan(f
*x + e)^2 + 1))/f

________________________________________________________________________________________

mupad [B]  time = 5.32, size = 123, normalized size = 1.03 \[ x\,\left (\frac {5\,a^2}{16}+\frac {3\,a\,b}{4}+\frac {b^2}{2}\right )+\frac {\left (\frac {5\,a^2}{16}+\frac {3\,a\,b}{4}+\frac {b^2}{2}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^5+\left (\frac {5\,a^2}{6}+2\,a\,b+b^2\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (\frac {11\,a^2}{16}+\frac {5\,a\,b}{4}+\frac {b^2}{2}\right )\,\mathrm {tan}\left (e+f\,x\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^6+3\,{\mathrm {tan}\left (e+f\,x\right )}^4+3\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)^6*(a + b/cos(e + f*x)^2)^2,x)

[Out]

x*((3*a*b)/4 + (5*a^2)/16 + b^2/2) + (tan(e + f*x)*((5*a*b)/4 + (11*a^2)/16 + b^2/2) + tan(e + f*x)^3*(2*a*b +
 (5*a^2)/6 + b^2) + tan(e + f*x)^5*((3*a*b)/4 + (5*a^2)/16 + b^2/2))/(f*(3*tan(e + f*x)^2 + 3*tan(e + f*x)^4 +
 tan(e + f*x)^6 + 1))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**6*(a+b*sec(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________